/**
 * 页面加载工具类
 */

import store from '@/store'

export function incrLoading() {
  if (!store.state.app.pageInit) {
    store.commit('app/SET_PAGEINIT', true)
  }
  store.commit('app/SET_LOADINGNUM', 1)
}

export function getLoadingNum() {
  return store.state.app.loadingNum
}

export function decrLoading() {
  store.commit('app/SET_LOADINGNUM', -1)
}

